package com.example.contentcenter.service.content;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestService {
    @Autowired
    DiscoveryClient discoveryClient;

    public List<ServiceInstance> testDiscovery() {
        List<ServiceInstance> instances = discoveryClient.getInstances("user-center");
        return instances;
    }

}
